<div>
  <form class="form-horizontal" role="form"
        data-ng-search-form="">
              <input type="hidden" name="_csrf" value="{{csrf}}"/>
    <div class="onlinesrc-container">

      <div class="form-group gn-required" ng-show="::ctrl.associationTypes.length">
        <label class="col-sm-3 control-label">
          <span data-translate="">associationType</span>
        </label>
        <div class="col-sm-5">
          <div data-schema-info-combo="codelist"
               data-schema-info-combo-values="ctrl.associationTypes"
               data-allow-blank="false"
               data-selected-info="config.associationType"
               data-gn-schema-info="associationType" lang="lang"></div>
        </div>
      </div>
      <div class="form-group" ng-show="::ctrl.initiativeTypes.length">
        <label class="col-sm-3 control-label">
          <span data-translate="">initiativeType</span>
        </label>
        <div class="col-sm-5">
          <div data-schema-info-combo="codelist"
               data-schema-info-combo-values="ctrl.initiativeTypes"
               data-selected-info="config.initiativeType"
               data-gn-schema-info="initiativeType"
               lang="lang"
               data-allow-blank="true"></div>
        </div>
      </div>
      <div class="form-group">
        <div class="col-sm-10">
          <div class="input-group dropdown" id="siblingdd">
            <span class="input-group-addon">
              <i class="fa fa-search"/>
            </span>
            <input class="form-control"
                   data-ng-change="updateParams();triggerSearch();" type="text"
                   data-toggle="dropdown"
                   data-ng-model="searchObj.any"
                   data-ng-model-options="modelOptions"
                   placeholder="{{'search' | translate}}"/>
            <ul class="dropdown-menu" role="menu">
              <li data-ng-repeat="md in searchResults.records">
                <a href=""
                   data-ng-click="addToSelection(md, config.associationType, config.initiativeType)">
                  {{md.title || md.defaultTitle}}
                </a>
              </li>
            </ul>
          </div>
        </div>
      </div>
      <div>
        <ul class="list-group">
          <li class="list-group-item gn-record"
              data-ng-repeat="obj in selection">
            {{obj.md.title || obj.md.defaultTitle}}
              <span><i>({{obj.associationType}}
                <span data-ng-show="obj.initiativeType">/ {{obj.initiativeType}}</span>)
              </i></span>
            <a data-ng-click="removeFromSelection(obj)" href="">
              <i class="btn fa fa-times text-danger pull-right"></i>
            </a>
          </li>
        </ul>
      </div>
      <div class="">
        <button type="button" class="btn navbar-btn btn-success"
                data-gn-click-and-spin="linkToResource()"
                data-ng-disabled="selection.length < 1">
          <i class="fa gn-icon-sibling"/>&nbsp;
          <span data-translate="">saveLinkToSibling</span>
        </button>
        <div data-gn-need-help="user-guide/associating-resources/linking-others.html"
             class="pull-right"></div>
      </div>
    </div>
  </form>
</div>
